#include "Logger.hpp"
#include <unistd.h>

int main()
{
    EnableFileLogStrategy();

    LOG(Loglevel::DEBUG) << "****************" << "11111111" ;
    LOG(Loglevel::ERROR) << "****************" << "11111111" ;
    LOG(Loglevel::WARNING) << "****************" << "11111111" ;
    LOG(Loglevel::FATAL) << "****************" << "11111111" ;




    // std::string test = "hello";
    // //创建一个智能指针，刷新到显示器
    // std::unique_ptr<LogStrategy> logger_ptr = std::make_unique<ConsoleLogStrategy>();
    // logger_ptr->SyncLog(Getcurrenttime());
    // sleep(1);
    // logger_ptr->SyncLog(Getcurrenttime());
    // sleep(1);
    // logger_ptr->SyncLog(Getcurrenttime());
    // sleep(1);
    //刷新到文件
    // std::unique_ptr<LogStrategy> logger_ptr = std::make_unique<FileLogStrategy>();
    // logger_ptr->SyncLog(test);
    // logger_ptr->SyncLog(test);
    // logger_ptr->SyncLog(test);

    return 0;
}